package statistics

import (
	"parking-lot-go-admin/controller"
	"parking-lot-go-admin/model/order"

	"github.com/gin-gonic/gin"
)

// 折线图
func Line(c *gin.Context) {
	var orderStruct order.OrderStruct

	//全部
	allHourStop := orderStruct.TimeSlot(-1)

	//如之停车
	rztcHourStop := orderStruct.TimeSlot(0)

	//小强
	xqHourStop := orderStruct.TimeSlot(1)

	//泊安飞
	parknflyHourStop := orderStruct.TimeSlot(2)

	//钉钉
	dingtalkHourStop := orderStruct.TimeSlot(3)

	controller.Success(c,
		map[string]interface{}{
			"all":      allHourStop,
			"rztc":     rztcHourStop,
			"xq":       xqHourStop,
			"parknfly": parknflyHourStop,
			"dingtalk": dingtalkHourStop,
		})
}
